package com.atguigu.lease.common.exceptions;

import com.atguigu.lease.common.result.Result;
import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

@Data
public class LeaseException extends RuntimeException{
    private  int code;
    public LeaseException(String message){
        super(message);
    }
    public LeaseException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        code=resultCodeEnum.getCode();
    }
    public LeaseException(String message,int code){
        super(message);
        this.code=code;
    }
}
